package com.topisv.tms.repository.work.inscope;

import java.util.List;

import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;

import com.topisv.tms.entity.work.inscope.InScope;

/**
 * 优势区配置_DAO
 * @author ch
 *
 */
public abstract interface InScopeDao extends PagingAndSortingRepository<InScope, Long>, JpaSpecificationExecutor<InScope>
{

	@Query("select t from InScope t where t.companyCode=? and t.warehouseCode=? order by t.zoneFullName")
	List<InScope> loadByCompanyCode(String companyCode,String warehouseCode);

	@Query("select t from InScope t where t.companyCode=? and t.zoneFullName=? and t.warehouseCode=? ")
	InScope loadByZoneFullName(String companyCode,String zoneFullName,String warehouseCode);
}